﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Razre.Base;
using System.Collections.ObjectModel;

namespace NavigationMVVMDemo.Models
{
    public class PersonModel : BaseModel
    {
        private string _firstName = string.Empty;
        private string _lastName = string.Empty;
        private ObservableCollection<PhoneNumberModel> _phoneNumbers = new ObservableCollection<PhoneNumberModel>();

        public string FirstName
        {
            get { return _firstName; }
            set 
            {
                if (_firstName != value)
                {
                    _firstName = value;
                    OnPropertyChanged("FirstName");
                }
            }
        }

        public string LastName
        {
            get { return _lastName; }
            set 
            {
                if (_lastName != value)
                {
                    _lastName = value;
                    OnPropertyChanged("LastName");
                }
            }
        }

        public ObservableCollection<PhoneNumberModel> PhoneNumbers
        {
            get { return _phoneNumbers; }
            set
            {
                if (_phoneNumbers != value)
                {
                    _phoneNumbers = value;
                    OnPropertyChanged("PhoneNumbers");
                }
            }
        }
    }
}
